Repository navigation
fix(doctor): a shell's own commands are no programs missing from PATH - #511
Merged
Merged
Conversation
`devstack doctor` checked the first word of each `build`, `run` and `exec` line on PATH, so `set "E2E_URL=…" && npx playwright test`, the line the stack file reference gives for Windows since 0.45.0, failed with "not on PATH: set". It now takes the first word of each command between `&&`, `||`, `;`, `|` and `&` (outside quotes), leaves out what the step's shell runs itself (cmd: `set`, `cd`, `call`, …; sh: `export`, `cd`, `.`, …) and, in sh, the assignments before a command, so `npx` is what gets checked. Closes #510 Bug-Class: shell-builtin-as-program Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
devstack doctorchecked the first word of eachbuild,runandexecline on PATH.set "E2E_URL={service.web.url}" && npx playwright test, the line the stack file reference recommends for Windows since 0.45.0 (#504), failed withnot on PATH, but the stack file runs them: set(#510). It now takes the first word of each command between&&,||,;,|and&(outside quotes;2>&1stays a redirection), leaves out what the step's shell runs itself (cmd:set,cd,call, …;sh:export,cd,., …) and, insh, the assignments before a command (X=1 npx …).shell-builtin-as-programthe_programs_of_a_line_leave_out_the_shells_builtinswritten first (red: no such function), green now; both shells, the reference's lines, quotes, groups, redirections, and a builtin of the other shell counting as a program. With a stack file holding the reference's line: 0.45.0 saysFAIL not on PATH … set, this buildok tools on PATH: node, npx.docker, which names its program. The behaviour is as old asdoctor(0.3.0); acd web && npm startline failed the same way.No review card: a check gets more exact; no format, trust or term changes.
Closes #510
🤖 Generated with Claude Code